<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use app\modules\clinical\models\Patient;
use yii\widgets\Breadcrumbs;
use app\modules\clinical\models\GeneInfo;

/* @var $this yii\web\View */
/* @var $model app\models\GeneReport */

$this->title = '查看基因报告';
$this->params['breadcrumbs'][] = ['label' => '临床信息', 'url' => ['/clinical/patient']];
$this->params['breadcrumbs'][] = ['label' => '辅助检查', 'url' => ['/clinical/check']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?= Breadcrumbs::widget([
    'homeLink' => ['label' => '医疗管理系统', 'url' => '#'],
    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>

<div class="gene-report-view">

    <p>
        <?= Html::a('修改', ['update', 'id' => $model->pk_id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('返回', '/clinical/gene', ['class' => 'btn btn-success']) ?>

        <?= Html::a('删除', ['delete', 'id' => $model->pk_id], [
            'class' => 'btn btn-danger btn-right',
            'data' => [
                'confirm' => '确定删除?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <table class="table table-striped table-bordered detail-view">
        <tr class="title">
          <td colspan="6"><h4>一、基因报告基本信息</h4></td>
        </tr>
        <tr>
            <th>姓名</th>
            <td><?= ($model->rel_id == 0) ? Yii::$app->session->get('pt_name') : Patient::findOne(['pk_id'=>$model->pt_id])->pt_name ?></td>
            <th>与患者关系</th>
            <td colspan="3"><?= ($model->rel_id == 0) ? '本人' : Patient::getParams('relation')[$pt_rel_list[$model->pt_id]] ?></td>
        </tr>
        <tr>
            <th>负责人姓名</th>
            <td><?= $model->charge_name ?></td>
            <th>病人复诊</th>
            <td><?= GeneInfo::getParams('recheck')[$model->pt_recheck] ?></td>
            <th>报告寄送</th>
            <td><?= GeneInfo::getParams('isSent')[$model->isSent] ?></td>
        </tr>
        <tr>
            <th>复诊时间</th>
            <td colspan="5"><?= $model->recheck_time ?></td>
        </tr>
        <tr class="title">
          <td colspan="6"><h4>二、讨论信息</h4></td>
        </tr>
        <tr>
            <th>送检项目</th>
            <td><?= $model->ck_program ?></td>
            <th>送检公司</th>
            <td><?= $model->ck_comp ?></td>
            <th>送检时间</th>
            <td><?= $model->ck_time ?></td>
        </tr>
        <tr>
            <th>送检结果</th>
            <td colspan="5"><?= $model->ck_result ?></td>
        </tr>
        <tr>
            <th>讨论结果</th>
            <td colspan="3"><?= $model->disc_result ?></td>
            <th>讨论时间</th>
            <td><?= $model->disc_time ?></td>
        </tr>
        <tr>
            <th>创建人</th>
            <td><?= $model->crt_name ?></td>
            <th>创建日期</th>
            <td colspan="3"><?= $model->crt_time ?></td>
        </tr>
        <tr>
            <th>修改人</th>
            <td><?= $model->update_name ?></td>
            <th>修改日期</th>
            <td colspan="3"><?= $model->update_at ?></td>
        </tr>
    </table>

</div>
